package training.hari.oops.inheritance.demo;

import training.hari.oops.inheritance.AbstractParent;
import training.hari.oops.inheritance.Child;
import training.hari.oops.inheritance.ChildForAbstractParent;
import training.hari.oops.inheritance.HelloWorld;
import training.hari.oops.inheritance.MyWorld;
import training.hari.oops.inheritance.Parent;

public class Demo {

	public static void main(String[] args) {
		
		Child child = new Child();
		child.sayGoodEvening();
		child.sayGoodMorning("hari");
	
		Parent p = new Parent();
		
		//next line will show up compilation error.
		//AbstractParent absParent = new AbstractParent() ;
		
		
		AbstractParent absParent = new ChildForAbstractParent() ;
		
		
		HelloWorld world = new MyWorld();
		world.sayGoodMorning();
		world.sayHello();
		
	
	}

}
